Skip to main content

standard_billing_validation

Purpose

The purpose of the rule is to ensure that there is some good status data(has status = measured or estimated) for billing determinants calculation. The rule cancels the flow in case all data is missing or there is at least one datapoint without good status.

Detailed description

  1. Check if any channel in the billing request, defined in the flow properties, is fully missing
  2. if yes, cancel the flow (FlowCancelException).
  3. Get all status columns from self.dataframe .
  4. Loop through each column and check
  5. if all rows = measured or estimated, continue to the next column.
  6. if at least one row ≠ measured or estimated, cancel the flow (FlowCancelException).

Common use cases

The rule is used in billing or other flows to be sure that the data to be processed is with a good status (measured or estimated).